package com.lyz.dataStructure.dome.CollectionDemo;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:26
 * @Description:
 **/

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/25 20:26
 *@Description:
 **/
public class Student {

    private String fristName,lastName;

    public Student(String fristName,String lastName){
        this.fristName=fristName;
        this.lastName = lastName;
    }

    @Override
    public boolean equals(Object obj){
        if (obj==null)
            return false;
        if(obj.getClass()!=Student.class){
            return false;
        }
        Student s = (Student)obj;
        if(this.fristName.equals(s.fristName)&&this.lastName.equals(s.lastName)){
            return true;
        }
        return false;
    }

    public String getFristName() {
        return fristName;
    }

    public void setFristName(String fristName) {
        this.fristName = fristName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String toString(){
        return fristName+"."+lastName;
    }
}
